home *** CD-ROM | disk | FTP | other *** search
/ Express Pd: GALORE / Express Pd Galore - The Amiga PD & Shareware CD (1994)(Express Pd)[!][Amiga-CD32-CDTV].iso / productivity / term / termarexxglobal.h < prev    next >
C/C++ Source or Header  |  1993-07-16  |  7KB  |  217 lines

  1. /*
  2. **    termARexxGlobal.h
  3. **
  4. **    Global data definitions for ARexx interface
  5. **
  6. **    Copyright © 1990-1993 by Olaf `Olsen' Barthel & MXM
  7. **        All Rights Reserved
  8. */
  9.  
  10. #include "termGlobal.h"
  11.  
  12.     /* Information table entry types. */
  13.  
  14. enum    {    INFO_STEM,INFO_TEXT,INFO_NUMERIC,INFO_BOOLEAN,INFO_MAPPED };
  15.  
  16.     /* Data types to save or open. */
  17.  
  18. enum    {    DATATYPE_TRANSLATIONS,DATATYPE_FUNCTIONKEYS,DATATYPE_CURSORKEYS,
  19.         DATATYPE_FASTMACROS,DATATYPE_HOTKEYS,DATATYPE_SPEECH,DATATYPE_SOUND,DATATYPE_BUFFER,
  20.         DATATYPE_CONFIGURATION,DATATYPE_PHONEBOOK,DATATYPE_SCREENTEXT,
  21.         DATATYPE_SCREENIMAGE,DATATYPE_COUNT };
  22.  
  23.     /* Requester types. */
  24.  
  25. enum    {    REQUESTER_SERIAL,REQUESTER_MODEM,REQUESTER_SCREEN,
  26.         REQUESTER_TERMINAL,REQUESTER_EMULATION,REQUESTER_CLIPBOARD,
  27.         REQUESTER_CAPTURE,REQUESTER_COMMANDS,REQUESTER_MISC,
  28.         REQUESTER_PATH,REQUESTER_TRANSFER,REQUESTER_TRANSLATIONS,
  29.         REQUESTER_FUNCTIONKEYS,REQUESTER_CURSORKEYS,REQUESTER_FASTMACROS,
  30.         REQUESTER_HOTKEYS,REQUESTER_SPEECH,REQUESTER_SOUND,REQUESTER_PHONE,
  31.         REQUESTER_COUNT };
  32.  
  33.     /* Window types. */
  34.  
  35. enum    {    WINDOWID_BUFFER,WINDOWID_REVIEW,WINDOWID_PACKET,WINDOWID_FASTMACROS,
  36.         WINDOWID_STATUS,WINDOWID_MAIN,WINDOWID_COUNT };
  37.  
  38.     /* The maximum length of an ARexx result variable. */
  39.  
  40. #define MAX_RESULT_LEN    65536
  41.  
  42.     /* ARexx interface error codes. */
  43.  
  44. #define TERMERROR_NO_DATA_TO_PROCESS            1000
  45. #define TERMERROR_INDEX_OUT_OF_RANGE            1001
  46. #define TERMERROR_UNKNOWN_OBJECT            1002
  47. #define TERMERROR_RESULT_VARIABLE_REQUIRED        1003
  48. #define TERMERROR_UNIT_NOT_AVAILABLE            1004
  49. #define TERMERROR_DEVICE_DRIVER_STILL_OPEN        1005
  50. #define TERMERROR_CLIPBOARD_ERROR            1006
  51. #define TERMERROR_INFORMATION_IS_READ_ONLY        1007
  52. #define TERMERROR_DATA_TYPES_INCOMPATIBLE        1008
  53. #define TERMERROR_LIST_IS_ALREADY_EMPTY            1009
  54. #define TERMERROR_UNKNOWN_LIST                1010
  55. #define TERMERROR_WRONG_LIST                1011
  56. #define TERMERROR_UNKNOWN_COMMAND            1012
  57.  
  58.     /* An information table entry node. */
  59.  
  60. struct AttributeEntry
  61. {
  62.     WORD     Level;        /* Node level */
  63.     STRPTR     Name;        /* Name or NULL for numeric value */
  64.     UBYTE     Type;        /* Node type (INFO_TEXT through INFO_MAPPED) */
  65.     BYTE     ReadOnly;    /* If information happens to be read-only */
  66.     STRPTR    *Mappings;    /* Type mappings if applicable */
  67.     WORD     NodeID;    /* Node ID code */
  68. };
  69.  
  70.     /* Argument mutual exclusion information. */
  71.  
  72. struct ExclusionInfo
  73. {
  74.     BYTE    A,B;
  75. };
  76.  
  77.     /* A special message and argument packet. */
  78.  
  79. struct RexxPkt
  80. {
  81.     struct Message         VanillaMessage;
  82.  
  83.     struct RexxMsg        *RexxMsg;
  84.     STRPTR            *Array;
  85.     struct RDArgs        *Args;
  86.     struct CommandInfo    *CommandInfo;
  87.     LONG             Results[2];
  88. };
  89.  
  90.     /* A special function key pointer. */
  91.  
  92. typedef STRPTR (* __regargs COMMAND)(struct RexxPkt *);
  93.  
  94.     /* Argument inclusion bits. */
  95.  
  96. #define INCLUDE_00 (1 <<  0)
  97. #define INCLUDE_01 (1 <<  1)
  98. #define INCLUDE_02 (1 <<  2)
  99. #define INCLUDE_03 (1 <<  3)
  100. #define INCLUDE_04 (1 <<  4)
  101. #define INCLUDE_05 (1 <<  5)
  102. #define INCLUDE_06 (1 <<  6)
  103. #define INCLUDE_07 (1 <<  7)
  104. #define INCLUDE_08 (1 <<  8)
  105. #define INCLUDE_09 (1 <<  9)
  106. #define INCLUDE_10 (1 << 10)
  107. #define INCLUDE_11 (1 << 11)
  108.  
  109.     /* Rexx command information. */
  110.  
  111. struct CommandInfo
  112. {
  113.     WORD    Async;
  114.     BYTE    Tool;
  115.     BYTE    Console;
  116.     COMMAND    Routine;
  117.     STRPTR    Name,
  118.         Arguments;
  119. };
  120.  
  121.     /* termARexx.c */
  122.  
  123. BYTE __regargs        IsNumeric(STRPTR String);
  124. STRPTR __regargs    CreateResult(STRPTR,LONG *);
  125. BYTE __stdargs        CreateVarArgs(STRPTR,struct RexxPkt *,STRPTR,...);
  126. STRPTR __regargs    CreateVar(STRPTR,struct RexxPkt *,STRPTR);
  127. STRPTR __regargs    CreateMatchBuffer(STRPTR);
  128. BYTE __regargs        MatchBuffer(STRPTR,STRPTR);
  129. VOID __regargs        DeleteMatchBuffer(STRPTR);
  130. VOID __regargs        RexxPktCleanup(struct RexxPkt *,STRPTR);
  131. WORD __regargs        ToMode(STRPTR);
  132. WORD __regargs        ToList(STRPTR);
  133. WORD __regargs        ToConfig(STRPTR);
  134. WORD __regargs        ToRequester(STRPTR);
  135. WORD __regargs        ToWindow(STRPTR);
  136.  
  137.     /* termARexxCommands.c */
  138.  
  139. STRPTR __regargs    RexxActivate(struct RexxPkt *);
  140. STRPTR __regargs    RexxAdd(struct RexxPkt *);
  141. STRPTR __regargs    RexxBaud(struct RexxPkt *);
  142. STRPTR __regargs    RexxBeepScreen(struct RexxPkt *);
  143. STRPTR __regargs    RexxCallMenu(struct RexxPkt *);
  144. STRPTR __regargs    RexxCapture(struct RexxPkt *);
  145. STRPTR __regargs    RexxClear(struct RexxPkt *);
  146. STRPTR __regargs    RexxClearScreen(struct RexxPkt *);
  147. STRPTR __regargs    RexxClose(struct RexxPkt *);
  148. STRPTR __regargs    RexxCloseDevice(struct RexxPkt *);
  149. STRPTR __regargs    RexxCloseRequester(struct RexxPkt *);
  150. STRPTR __regargs    RexxDeactivate(struct RexxPkt *);
  151. STRPTR __regargs    RexxDelay(struct RexxPkt *);
  152. STRPTR __regargs    RexxDial(struct RexxPkt *);
  153. STRPTR __regargs    RexxDuplex(struct RexxPkt *);
  154. STRPTR __regargs    RexxFault(struct RexxPkt *);
  155. STRPTR __regargs    RexxGetClip(struct RexxPkt *);
  156. STRPTR __regargs    RexxHangup(struct RexxPkt *);
  157. STRPTR __regargs    RexxHelp(struct RexxPkt *);
  158. STRPTR __regargs    RexxOpen(struct RexxPkt *);
  159. STRPTR __regargs    RexxOpenDevice(struct RexxPkt *);
  160. STRPTR __regargs    RexxOpenRequester(struct RexxPkt *);
  161. STRPTR __regargs    RexxParity(struct RexxPkt *);
  162. STRPTR __regargs    RexxPasteClip(struct RexxPkt *);
  163. STRPTR __regargs    RexxPrint(struct RexxPkt *);
  164. STRPTR __regargs    RexxProtocol(struct RexxPkt *);
  165. STRPTR __regargs    RexxPutClip(struct RexxPkt *);
  166. STRPTR __regargs    RexxQuit(struct RexxPkt *);
  167. STRPTR __regargs    RexxRead(struct RexxPkt *);
  168. STRPTR __regargs    RexxReceiveFile(struct RexxPkt *);
  169. STRPTR __regargs    RexxRedial(struct RexxPkt *);
  170. STRPTR __regargs    RexxRemove(struct RexxPkt *);
  171. STRPTR __regargs    RexxRequestFile(struct RexxPkt *);
  172. STRPTR __regargs    RexxRequestNotify(struct RexxPkt *);
  173. STRPTR __regargs    RexxRequestNumber(struct RexxPkt *);
  174. STRPTR __regargs    RexxRequestResponse(struct RexxPkt *);
  175. STRPTR __regargs    RexxRequestString(struct RexxPkt *);
  176. STRPTR __regargs    RexxResetScreen(struct RexxPkt *);
  177. STRPTR __regargs    RexxResetStyles(struct RexxPkt *);
  178. STRPTR __regargs    RexxResetText(struct RexxPkt *);
  179. STRPTR __regargs    RexxSave(struct RexxPkt *);
  180. STRPTR __regargs    RexxSaveAs(struct RexxPkt *);
  181. STRPTR __regargs    RexxSelect(struct RexxPkt *);
  182. STRPTR __regargs    RexxSend(struct RexxPkt *);
  183. STRPTR __regargs    RexxSendBreak(struct RexxPkt *);
  184. STRPTR __regargs    RexxSendFile(struct RexxPkt *);
  185. STRPTR __regargs    RexxSpeak(struct RexxPkt *);
  186. STRPTR __regargs    RexxStopBits(struct RexxPkt *);
  187. STRPTR __regargs    RexxTextBuffer(struct RexxPkt *);
  188. STRPTR __regargs    RexxTimeout(struct RexxPkt *);
  189. STRPTR __regargs    RexxWait(struct RexxPkt *);
  190. STRPTR __regargs    RexxWindow(struct RexxPkt *);
  191. STRPTR __regargs    RexxRX(struct RexxPkt *);
  192. STRPTR __regargs    RexxExecTool(struct RexxPkt *);
  193.  
  194.     /* termARexxAttributes.c */
  195.  
  196. STRPTR __regargs    RexxGetAttr(struct RexxPkt *);
  197. STRPTR __regargs    RexxSetAttr(struct RexxPkt *);
  198.  
  199.     /* termARexxData.c */
  200.  
  201. extern struct AttributeEntry     AttributeTable[];
  202. extern LONG             AttributeTableSize;
  203.  
  204. extern UWORD             InclusionTable[];
  205. extern struct ExclusionInfo    *ExclusionTable[];
  206.  
  207. extern struct CommandInfo     CommandTable[];
  208. extern LONG             CommandTableSize;
  209.  
  210. extern struct MsgPort        *RexxPort;
  211. extern LONG             LastRexxError;
  212. extern LONG             RexxTimeoutVal;
  213. extern BYTE             UpdateRequired,
  214.                  TransferUpdateRequired;
  215. extern LONG             RexxLaunchCount;
  216. extern struct SignalSemaphore     RexxLaunchSemaphore;
  217.